/*
 *  $TEAM_NAME Space Trader
 */
import models.Ship;
import models.Weapon;
import java.util.List;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

/**
 * Tests the ability of a ship to add weapons
 * @author Andrew Hallacy
 * @version 1.0
 */
public class WeaponAddTest {
	/**
	 * creates a Bumblebee ship for test 1
	 */
	private final Ship ship1 = Ship.mosquito();
	
	/**
	 * creates a Bumblebee ship for test 2
	 */
	private final Ship ship2 = Ship.mosquito();
	
	/**
	 * creates a Bumblebee ship for test 3
	 */
	private final Ship ship3 = Ship.mosquito();
	
	/**
	*Creates an instance of a pulse Laser
	*/
	private final Weapon pulseLaser= Weapon.pulseLaser();;
	
	/**
	*Creates an instance of a beam Laser
	*/
	private final Weapon beamLaser= Weapon.beamLaser();;
	
	/**
	 * Tests to see if we can add a weapon to an empty ship
	 */
    @Test
    public void addWithNoWeapons() {
    assertTrue("Add Pulse_Laser with none equipped: ", ship1.canAddWeapon(pulseLaser));
    }

    /**
     * Test to see if we can add one weapon, and then another
     */
    @Test
    public void addTwoWeapons() {
    	assertTrue("Adds the first weapon: ", ship2.canAddWeapon(beamLaser));
    	assertTrue("Add two weapons in a row: ", ship2.canAddWeapon(pulseLaser));
}

    /**
     * Test to see if a weapon can be added when all weapon slots are full
     */
    @Test
    public void addWeaponWhenFull(){
    	assertTrue("Adds the first weapon is added: ", ship3.canAddWeapon(pulseLaser));
    	assertTrue("Adds the second weapons is added: ", ship3.canAddWeapon(pulseLaser));
    	assertFalse("Cannot add a weapon when the ships weapon slots are full: ",
    			 ship3.canAddWeapon(pulseLaser));
    	}
}